// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import axios from 'axios';
import 'reset-css';
import VueAwesomeSwiper from 'vue-awesome-swiper'
import 'swiper/dist/css/swiper.css'
import 'animate.css'


import Es6Promise from 'es6-promise';
Es6Promise.polyfill()


axios.defaults.timeout = 15000;
axios.defaults.withCredentials = true;
//本地
// axios.defaults.baseURL = 'http://cwbz.jxsks.com/';
//线上
axios.defaults.baseURL = 'http://120.203.64.203:5880/';
Vue.prototype.$axios = axios;

Vue.use(VueAwesomeSwiper, /* { default global options } */ )
Vue.config.productionTip = false;

Vue.prototype.$VueAwesomeSwiper = VueAwesomeSwiper

//跳转
Vue.prototype.$toweb = function(url) {
    window.open(url)
}

//设备判断
Vue.prototype.$isMobile = function() {
    let flag = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)
    return flag;
}

new Vue({
    el: '#app',
    router,
    components: { App },
    template: '<App/>'
})